put "Free Text Browser - Copyright © 1990 - Mark Zimmermann" & return & "Click on the '?' for help." & return & "This program is free and comes with NO WARRANTY whatsoever!" into field "Text"
end if
end if
initGlobals -- set up many things for this stack
if item 4 of the screenrect <= 342 then hide menuBar
pass openStack
end openStack
on closeStack
-- close out files, vars, empty fields nicely
set cursor to watch
lock screen
repeat for the number of cards -- close all database files
if the short name of this bkgnd is "BrowserBg" then closeDatabase
go to next card
end repeat
show menuBar
pass closeStack
end closeStack
on closeDatabase
-- called before opening a file as well as when leaving the stack
get openCloseFiles (getTextFileRefNum(), getKeyFileRefNum(), getPtrFileRefNum())
if not (getSubsetHandle(1) = 0 or getSubsetHandle(1) = empty) then
get zbrowser ("RELEASESUBSET", getSubsetHandle(1))
setSubsetHandle 1,0
end if
if not (getSubsetHandle(2) = 0 or getSubsetHandle(2) = empty) then
get zbrowser ("RELEASESUBSET", getSubsetHandle(2))
setSubsetHandle 2,0
end if
put empty into field "FTVars"
put empty into field "Index1"
put empty into field "Index2"
put empty into field "Context"
put empty into field "Text"
put empty into field "Database Name"
if the height of field "Text" > 169 then
send mouseUp to bg button id 44
end if
hide field "searchPattern1"
hide field "searchPattern2"
hide bg button "and subsets"
hide bg button "or subsets"
hide bg button "not subset 1"
hide bg button "not subset 2"
hide bg button "fill subset 1"
hide bg button "fill subset 2"
end closeDatabase
on initGlobals
-- initialize many things here for the stack to use globally